/*
** ADOBE SYSTEMS INCORPORATED
** Copyright 2012 Adobe Systems Incorporated
** All Rights Reserved.
**
** NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the
** terms of the Adobe license agreement accompanying it.  If you have received this file from a
** source other than Adobe, then your use, modification, or distribution of it requires the prior
** written permission of Adobe.
*/

#pragma once
#include <Flash++.h>
#include <Renderable.h>
#include <MathUtils.h>

using namespace AS3::ui;

namespace SpaceTriangle
{
	/*
	* Base class for all things within the game.
	*/
	class Actor : public Renderable
	{
		public:

			vec3 pos,speed;

			Actor(flash::display3D::Context3D _ctx3d) : Renderable(_ctx3d) {
			}

			virtual ~Actor() { }

			virtual void tick() = 0;

			virtual void render() { }

			void gravity(Actor *a) {
				if(a == this)
					return;

				/*vec3 dir = a->pos - pos;
				float s = 1.0 / dir.length();
				dir.normalize();
				speed += s * dir;*/
			}
	};
}